package xcmg.device.service.returnMaterial;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xcmg.device.dao.entity.returnMaterial.ReturnMaterialDetailDO;
import xcmg.device.dao.mapper.returnMaterial.ReturnMaterialDetailMapper;
import xcmg.device.dao.mapper.returnMaterial.ReturnMaterialMapper;
import xcmg.device.infra.ErrorCode;

import java.util.List;

/**
 * @author ZHANGK
 * @date 2020/6/18
 **/
@Service
public class ReturnMaterialDetailService {

    @Autowired
    ReturnMaterialDetailMapper returnMaterialDetailMapper;

    public boolean insert(ReturnMaterialDetailDO returnMaterialDetailDO){
        return returnMaterialDetailMapper.insert(returnMaterialDetailDO);
    }

    public List<ReturnMaterialDetailDO> selectList(ReturnMaterialDetailDO returnMaterialDetailDO){
        return returnMaterialDetailMapper.selectList(returnMaterialDetailDO);
    }

    public boolean updateById(ReturnMaterialDetailDO returnMaterialDetailDO){
        return returnMaterialDetailMapper.updateById(returnMaterialDetailDO);
    }

    public boolean deleteById(ReturnMaterialDetailDO returnMaterialDetailDO){
        return returnMaterialDetailMapper.deleteById(returnMaterialDetailDO);
    }

    public boolean delete(ReturnMaterialDetailDO returnMaterialDetailDO) {
        return returnMaterialDetailMapper.delete(returnMaterialDetailDO);
    }

    public boolean batchDeleteByReturnId(List<String> ids) {
        return returnMaterialDetailMapper.batchDeleteByReturnId(ids);
    }

    public boolean batchInsert(List<ReturnMaterialDetailDO> returnMaterialDetailDOList){
        return returnMaterialDetailMapper.batchInsert(returnMaterialDetailDOList);
    }


}
